<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@yield('title')</title>
    <meta name="keywords" content="@yield('keywords')">
    <meta name="description" content="@yield('description')"/>
    <link rel="shortcut  icon" type="image/x-icon" href="./favicon.ico" media="screen"  />
    <link href="{{ asset('static/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
    {{--    公共css--}}
    <link href="{{ asset('static/css/style.css') }}" rel="stylesheet" type="text/css" />
    {{--    页面自定义css--}}
    @yield('css')

    <script src="{{ asset('static/javascript/jquery-1.10.2.min.js') }}" type=""></script>
    <script src="{{ asset('static/javascript/slider.js') }}" type=""></script>
</head>

<body>

@include('index.layouts._header')

<div class="content_on">

    @include('index.layouts._slider')

    <div class="content_body">
        <div class="content">

            @yield('content')

        </div>
    </div>
</div>

@include('index.layouts._footer')

@include('index.layouts._kefu')



{{--    页面自定义js--}}
@yield('js')

<!-- dd menu -->
<script type="text/javascript">

    var index = {
        initPage: function() {
            var self = this;
            self.initBtn(self);
        },
        initBtn: function(self) {
            var english = ["Hello", "June"];
            var chinese = [];
            $(".content").children(".yes").each(function(i, item) {
                var pag_val = $.trim($(item).text());
                chinese.push(pag_val);
            });
            $("button").click(function() {
                if ($.trim($(this).text()) === "中文") {
                    $(this).text("english")
                    $(".content").children(".yes").each(function(i, item) {
                        $(item).text(chinese[i]);
                    });
                } else {
                    $(this).text("中文");
                    $(".content").children(".yes").each(function(i, item) {
                        $(item).text(english[i]);
                    });
                }
            })
        }
    };
    $(function() {
        index.initPage();
    })

    var timeout = 100;
    var closetimer= 0;
    var ddmenu = null;
    var ddmenuitem = null;
    // open hidden layer
    function myex_mopen(obj,id)
    {
        if(ddmenu != null) {
            ddmenu.className = '';
        }
        ddmenu = obj;
        ddmenu.className="curt";
        // cancel close timer
        myex_mcancelclosetime();

        // close old layer
        if(ddmenuitem) ddmenuitem.style.display = 'none';

        // get new layer and show it
        ddmenuitem = document.getElementById(id);
        ddmenuitem.style.display = 'block';

    }
    // close showed layer
    function myex_mclose()
    {
        if(ddmenuitem != null) {
            ddmenuitem.style.display = 'none';
        }
        if(ddmenu != null) {
            ddmenu.className = '';
        }
    }

    // go close timer
    function myex_mclosetime(obj)
    {
        closetimer = window.setTimeout(myex_mclose, timeout);
    }

    // cancel close timer
    function myex_mcancelclosetime()
    {
        if(closetimer)
        {
            window.clearTimeout(closetimer);
            closetimer = null;
        }
    }

    // close layer when click-out
    document.onclick = myex_mclose;
    // -->
</script>

</body>

